cmake_minimum_required(VERSION 3.11)
project(Calibration LANGUAGES CXX)

# 工程配置
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

#-------------------------------------- -添加项目- --------------------------------------
file(GLOB_RECURSE HEADER_FILES include/*.h)
file(GLOB_RECURSE SOURCE_FILES src/*.cpp)

#-------------------------------------- 搜索软件包 --------------------------------------
find_package(OpenCV REQUIRED)

#-------------------------------------- 添加头文件 --------------------------------------
include_directories(include
  ${CMAKE_CURRENT_SOURCE_DIR}/include
  ${CMAKE_CURRENT_SOURCE_DIR}/config
  ${OpenCV_DIRS}/include/
  ${OpenCV_DIRS}/include/opencv2
)

#-------------------------------------- 链接库文件 --------------------------------------
link_directories(${OpenCV_DIRS}/lib)

# 可执行文件
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})

target_link_libraries(
    ${PROJECT_NAME}
    ${OpenCV_LIBS}
    )
